<template>
	<div class="mobile">
		<div class="nav-top">
			<div class="left">
				<router-link to="/portal/netm"><img src="../../../assets/img/phone-back.png" alt=""></router-link>
			</div>
			<div class="right">
				<span>代表履职</span>
				<img src="../../../assets/img/phone-more.png" alt="">
			</div>

		</div>
		<div class="trends-top">
			<div class="top">
				<div class="left">
					<img src="../../../assets/img/net1.png" alt="">
					<div class="name">
						{{userInfo.username}}
						<div class="phone">
							{{ userInfo.phone }}
						</div>
					</div>
				</div>
				<div class="right">
					<select v-model="startDate" @change="selectDate">
										<option value="2024">2024年</option>
										<option value="2023">2023年</option>
										<option value="2022">2022年</option>
										<option value="2021">2021年</option>
										<option value="2020">2020年</option>
										<option value="2019">2019年</option>
									</select>
				</div>
			</div>
			<div class="count">
				<div class="num">{{List.total}}</div>
				<div class="times">履职次数</div>
			</div>
		</div>
		<div class="today">
			<h5>今天</h5>
			<router-link to="/portal/net/repreWorkAddm">
			<div class="add">
				+
			</div></router-link>
		</div>
		<div class="trends-list" v-for="item in List.rows">
            <div class="top">
				<div class="left">
					{{item.logDate}}
				</div>
				<div class="right">
					<div class="status">审核中</div>
					<img src="../../../assets/img/phone-more-gray.png" alt="">
				</div>
			</div>
			<div class="text">
				<span>履职类型：建议</span>
				<span>履职地点：{{item.location}}</span>
			</div>
			<p v-html="item.description"></p>
			<div class="pic-list">
				<img :src="item.imagePath" alt="">
			</div>
		</div>
		<div class="trends-nav">
			<div class="item "><router-link to="/portal/net/repreWorkAddm"><img src="../../../assets/img/phone-icon3.png" alt="">新建纪实</router-link></div>
			<div class="item active "><img src="../../../assets/img/phone-icon4.png"
						alt="">历史纪实</div>
		</div>
	</div>
</template>

<script>
import { getRepWorkList } from "@/api/website";
export default {
	data() {
		return {
			List: [],
			userInfo:"",
			startDate: "2024"
		}
	},
	components: {
	},
	created() {
		this.userInfo = JSON.parse(sessionStorage.getItem("useInfo"));
		this.getlist(this.userInfo.id);
	},
	mounted() {

	},
	methods: {
		getlist(id,date) {
			getRepWorkList({ id: id ,date: date}).then(response => {
				this.List = response;
			});
		},
		selectDate() {
			this.getlist(this.userInfo.id, this.startDate)
		}
	}

};
</script>

<style scoped lang="scss"></style>